package com.fmjava.web;

import com.fmjava.domain.PageListResult;
import com.fmjava.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class EmployeeController {
@Autowired
EmployeeService employeeService;


  /*获取json中的跳转数据url*/
    @RequestMapping("/employee")
    public String employee(){
        return "employee";
    }

    @RequestMapping("/listData")
    @ResponseBody
    public PageListResult getAllEmployee() {
        PageListResult allEmployee = employeeService.getAllEmployee();
        return allEmployee;
    }
}
